Search this book | Previous | Table of contents | Next

Redirect.acgi


Redirect is a utility to help preserve the integrity of your server even when you move files in your server's directory structure. To do this, it first maintains a list of invalid URLs on your server and maps them to valid URLs. Second, it traps requests for these invalid URLs, and if they exist in Redirect's list, it then sends a redirection command back to the requesting client application with the correct URL. If the URL does not exist in Redirect's list, then the default error file is returned instead.

To get Redirect to work you first must install the Tokenize, Replace, Offsets Of, and Decode URL OSAX. Next, you must reconfigure your machttp.conf file instruction MacHTTP what file to return when an error exists. In other words, you must redefine the ERROR directive to the location of "redirect.acgi." Third, configure Redirect by accessing it through your server with the redir__admin path arguments. This configuration process allows you to create your table of invalid/valid URLs. It also allows you to specify your default error.html file. (As an experiment, Kelly's Error.acgi program was defined for this purpose, but Error.acgi did not work as expected since Redirect did not send it AppleEvents; Redirect simply calls files without any arguments.) The last step in using Redirect is to create a REALM directive protecting redirect.acgi eliminating the possibilities for other people configuring your redirection tables.

Redirect is a good program for you to use if you change the names and/or locations of the files on your server.


Search this book | Previous | Table of contents | Next

Eric last edited this page on September 26, 1995. Please feel free to send comments.